<cfoutput>
<select#parent.getFieldAttributes(attributes,excludes)#>
	<!--- *** LIST HEADER *** --->	
	<cfif structKeyExists(config,'valueHeader')>
	<option value="#config.valueHeader#">#config.optionHeader#</option>					
	</cfif>
	#thisTag.generatedContent#
	<!--- *** OUTPUTTING THE LIST *** --->
	<!--- Populating by QUERY --->
	<cfif structKeyExists(config,'query')>
		<cfloop query="config.query">
			<cfset key = trim(evaluate(config.value))/>
	<option value="#key#"<cfif listFindNocase(config.selectedValue,key)> selected="selected"</cfif>>#trim(evaluate(config.option))#</option>
		</cfloop>
					
	<!--- Populating by LIST --->											
	<cfelseif structKeyExists(config,'list')>
		<cfloop list="#evaluate(config.list)#" index="i" delimiters="#config.delimiters#">
			<cfif listlen(i,config.valueDelimiters) gt 1>
				<cfset key = trim(listFirst(i,config.valueDelimiters))/>
	<option value="#key#"<cfif listFindNocase(config.selectedValue,key)> selected="selected"</cfif>>#trim(listLast(i,config.valueDelimiters))#</option>
			<cfelse>
	<option value="#trim(i)#"<cfif listFindNocase(config.selectedValue,trim(i))> selected="selected"</cfif>>#trim(i)#</option>
			</cfif>
		</cfloop>
					
	<!--- Populating by VALUELIST and OPTONLIST --->
	<cfelseif structKeyExists(config,'valueList')>
		<cfset config.valueList = evaluate(config.valueList)/>
		<cfset config.optionList = evaluate(config.optionList)/>
		<cfloop from="1" to="#listLen(config.valueList,config.valueDelimiters)#" index="i">
			<cfset key = trim(listGetAt(config.valueList,i,config.valueDelimiters))/>
	<option value="#key#"<cfif listFindNocase(config.selectedValue,key)> selected="selected"</cfif>>#trim(listGetAt(config.optionList,i,config.delimiters))#</option>
		</cfloop>
					
	<!--- Populating by ARRAY --->
	<cfelseif structKeyExists(config,'array')>
		<cfloop from="1" to="#arrayLen(config.array)#" index="i">
			<cfset key = trim(config.array[i])/>
	<option value="#key#"<cfif listFindNocase(config.selectedValue,key)> selected="selected"</cfif>>#key#</option>
		</cfloop>
					
	<!--- Populating by VALUEARRAY and OPTIONVALUE--->
	<cfelseif structKeyExists(config,'valueArray')>
		<cfloop from="1" to="#arrayLen(config.valueArray)#" index="i">
			<cfset key = trim(config.valueArray[i])/>
	<option value="#key#"<cfif listFindNocase(config.selectedValue,key)> selected="selected"</cfif>>#trim(config.optionArray[i])#</option>
		</cfloop>
	</cfif>
</select>
</cfoutput>